package Song.Han.day01.demo02;

public class Demo04MethodReturn {
    public static void main(String[] args) {

        int num = getSum(10,20);//赋值调用
        System.out.println("返回值是:"+num);
        System.out.println("===================");

        printSum(10,20);//单独调用
    }

    public static int getSum(int a,int b){
        int c = a + b;
        return c;
    }
    public static void printSum(int a,int b){
        int c = a + b;
        System.out.println("结果是："+c);
    }
}
